Increase timeout while waiting for console/tty node to appear in the store:
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 21 Mar 2006 10:56:11 +0000 (11:56 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 21 Mar 2006 10:56:11 +0000 (11:56 +0100)
the intention appears to have been 500msec, but struct timeval when used with
a select() is in usec, not msec.  The timeout has been set to 250msec (500msec
seems a little long, in any case).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/console/client/main.c

index f500a593adfa26082da0a2ae70b1760c7e4b0f57..aba35ec2c66725867fe3be98f949cf94f6ae9e3e 100644 (file)
@@ -242,7 +242,7 @@ int main(int argc, char **argv)
 
        now = time(0);
        while (str_pty == NULL && (now + 5) > time(0)) {
-               struct timeval tv = { 0, 500 };
+               struct timeval tv = { 0, 250000 };
                select(0, NULL, NULL, NULL, &tv); /* pause briefly */
 
                str_pty = xs_read(xs, XBT_NULL, path, &len);